package com.donkey.test;

public class NanoTime {
    public static void main(String[] args) {
        long a1 = System.currentTimeMillis();
        long a2 = System.nanoTime();
        try {
            Thread.sleep(1);
        } catch (Exception e) {
        }
        long b2 = System.nanoTime();
        long b1 = System.currentTimeMillis();

        System.out.println(a1);
        System.out.println(a2);
        System.out.println(b1);
        System.out.println(b2);
        System.out.println(b1 - a1);
        System.out.println(b2 - a2);
        System.out.println(System.nanoTime() - b2);
        System.out.println(System.nanoTime() - b2);
        System.out.println(System.nanoTime() - b2);
    }
}
